package com.daman

import java.text.SimpleDateFormat
import java.util.Date

/**
 *  返回 json 数据
 *  正确
 *  错误
 */
object Respond {

  def success(data:Any) = {
    Map("success"->"true","data"->data)
  }

  def fail(errorInfo:Any) = {
    Map("success"->"false","errorInfo"->errorInfo)
  }
}

object  Tookit {
  val dateTimeFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
  def getCurrent = {
    dateTimeFormat.format(new Date())
  }
}